import {ConfigProvider, message, notification, theme} from "antd";
import {AppRouter} from "@/router/AppRouter.tsx";
import zhCN from 'antd/locale/zh_CN';

function App() {
    const [messageApi, contextHolder] = message.useMessage();
    const [notificationApi, notificationContextHolder] = notification.useNotification();
    window.messageApi = messageApi
    window.notificationApi = notificationApi
    return (
        <ConfigProvider
            theme={{
                algorithm: theme.darkAlgorithm
            }}
            locale={zhCN}
        >
            <AppRouter/>
            {contextHolder}
            {notificationContextHolder}
        </ConfigProvider>
    )
}

export default App
